package com.lieve.servicea.service;

import com.lieve.servicea.entity.Article;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author sunlijiang
 * @date 2020/2/22
 */
@Service
public class ArticleServiceImpl implements ArticleService {
    @Override
    public List<Article> getArticleList() {
        List<Article> list = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            list.add(Article.builder()
                    .id(i)
                    .title("title" + i)
                    .summary("summary" + i)
                    .createTime(new Date())
                    .build());
        }
        return list;
    }
}
